<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ page import="java.util.*" %>
<%@page import="com.newblog.model.Category"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<table width="2">
<tr><td>ID</td><td>name</td><td>desc</td><td>uid</td></tr>
<%
List all = (List)request.getAttribute("allCategory");
Iterator iter = all.iterator();
while(iter.hasNext()){
     Category c = (Category)iter.next(); 
     out.println("<tr ><td>"+c.getId()+"</td>");
     out.println("<td>"+c.getName()+"</td>");
     out.println("<td>"+c.getDesc()+"</td>");
     out.println("<td>"+c.getBid()+"</td>");
     out.println("<td><a href='category.do?act=deleteCategory&cid="+c.getId()+"'>删除</td>");
     out.println("<td><a href='category.do?act=updateCategory&cid="+c.getId()+"'>更新</td>");
     out.println("</tr>");
     }  
%>

</table>
</body>
</html>